package com.rd.teacher.jichao.day21;

import java.util.Arrays;

public class Test1 {
    public static void main(String[] args) {
        int[] arr = {60, 77, 33, 55, 11, 22, 80};
        System.out.println(arr.length);

        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = 0; j < arr.length - 1 - i; j++) {

                System.out.println(i + "," + j);

                if (arr[j] > arr[j + 1]) {
                    int tmp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = tmp;
                    System.out.println(Arrays.toString(arr));
                }
            }
        }
    }
}